/****************************************************************************
**
** Copyright (C) 2008- Henrique Marks, Rodrigo Rebello. All rights reserved.
**
** 
**	Colocar a licença GPLv2 aqui, em algum lugar
** 
**
**
****************************************************************************/
#include <Qt>
#include <QtGui>
#include <QLabel>

#include "mainwindow.h"
#include "simpleitem.h"


MainWindow::MainWindow()
{
	QGraphicsScene *scene = new QGraphicsScene;
	QPainter *painter = new QPainter;
	painter->setPen(Qt::blue);
	painter->setBrush(Qt::black);
	
	/* Primeiro criar nosso próprio item */
	SimpleItem *item = new SimpleItem(0);
	/* E agora adicioná-lo a cena */
    scene->addItem( item );
	
	view = new QGraphicsView(scene);
    
	view->show();
	
    QHBoxLayout *layout = new QHBoxLayout;
    layout->addWidget(view);

    QWidget *widget = new QWidget;
    widget->setLayout(layout);
	
    setCentralWidget(widget);
    setWindowTitle(tr("Chess Board"));
}

